/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"71BD98EC-CF9F-4471-BF90-D614C0D8F445"}
 */
function imprimir(event) 
{
	forms.despiece_tree_imp_costos.imagen_tree = application.createJPGImage(elements.bean_103, 580, 335);
	forms.despiece_tree_imp_costos.imagen_x_tipo = application.createJPGImage(elements.bean_522, 340, 205);

	forms.despiece_tree_imp_costos.controller.showPrintPreview(true)
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"90002594-F80D-4539-9831-C3B9E23C220A"}
 */
function pdf(event) 
{
	// GENERAR PDF
	forms.despiece_tree_imp_costos.imagen_tree = application.createJPGImage(elements.bean_103, 580, 500);
	forms.despiece_tree_imp_costos.imagen_x_tipo = application.createJPGImage(elements.bean_522, 400, 200);
	var nombre_pdf = globals.zconf_path_pdf + '/costos_'+ utils.dateFormat(new Date(),'dd-MM-yyyy HH-mm-ss')+'.pdf'
	forms.despiece_tree_imp_costos.controller.print(true,false,plugins.pdf_output.getPDFPrinter(nombre_pdf))
	application.showURL('file:///'+ nombre_pdf)
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"F6FA504E-0E14-49DA-8DDC-C37BE8279538"}
 */
function volver(event) {
	var nombre = application.getWindow('COSTOS')
	nombre.hide()
	nombre.destroy()
}
